package org.jprobe;

/**
*
* JUnit result implementation
*
* @author Hussain Al-Mutawa
* @version 1.0
*/
public class JUnitResults implements JUnitResultsInterface{
	/** current project **/
	private transient final String project;
	/** test results data **/
	private transient final int tests,failures,errors;
	/** test results data **/
	private transient final double successRate, testingTime;
	/**
	 * Initializes new Junit Tests results and prepares its values
	 *
	 * @param project the project for which the results are calculated
	 */
	public JUnitResults(final String project) {
		super();
		this.project=project;

		//dummy implementation
		tests = 12440;
		failures = 1607;
		errors = 3288;
		successRate = 0.60d;
		testingTime = 39.049d;
	}

	@Override public String getProject() {
		return project;
	}

	@Override public int getTests() {
		return tests;
	}

	@Override public int getFailures() {
		return failures;
	}

	@Override public int getErrors() {
		return errors;
	}

	@Override public double getSuccessRate() {
		return successRate;
	}

	@Override public double getTestingTime() {
		return testingTime;
	}
}
